<?php
/**
 *                    _ooOoo_
 *                   o8888888o
 *                   88" . "88
 *                   (| -_- |)
 *                    O\ = /O
 *                ____/`---'\____
 *              .   ' \\| |// `.
 *               / \\||| : |||// \
 *             / _||||| -:- |||||- \
 *               | | \\\ - /// | |
 *             | \_| ''\---/'' | |
 *              \ .-\__ `-` ___/-. /
 *           ___`. .' /--.--\ `. . __
 *        ."" '< `.___\_<|>_/___.' >'"".
 *       | | : `- \`.;`\ _ /`;.`/ - ` : | |
 *         \ \ `-. \_ __\ /__ _/ .-` / /
 * ======`-.____`-.___\_____/___.-`____.-'======
 *                    `=---='
 *
 * .............................................
 *          佛祖保佑             永无BUG
 */

namespace App\Repository;


use GuzzleHttp\Client;

class BaiduRepository
{
    protected $client;
    public function __construct(Client $client)
    {
        $this->client=$client;
    }
    public function getAccountInfo(){
       $response= $this->client->post('https://api.baidu.com/json/sms/service/AccountService/getAccountInfo',[
           'headers' => [
               'username' => '广州市昊信',
               'password' => 'HaoXin34803888',
               'token'=>'1b2b5fd3882a1561e3315380422bb470',
              // "target"=>"target_username",
               "Content-type"=> "application/json"
           ]
        ]);
       dd($response->getBody()->getContents());
    }
}